package com.ws.ssmzongjie3.service.impl;

import com.ws.ssmzongjie3.bean.User;
import com.ws.ssmzongjie3.mapper.UserMapper;
import com.ws.ssmzongjie3.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public User getLogin(User user) {
        return userMapper.getLogin(user);
    }

    @Override
    public void insertUser(User user) {
        userMapper.insertUser(user);
    }

    @Override
    public void updateUser(User user) {
        userMapper.updateUser(user);
    }

    @Override
    public void deleteUser(User user) {
        userMapper.deleteUser(user);
    }

    @Override
    public List<User> listUser(User user) {
        return userMapper.listUser(user);
    }

    @Override
    public User getUserById(User user) {
        return userMapper.getUserById(user);
    }

    @Override
    public User getUserByName(User user) {
        return userMapper.getUserByName(user);
    }
}
